from urllib import request

if __name__ == '__main__':
    url = "https://item.jd.com/100102419016.html"
    headers = {
        'user-agent':"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36",
        'cookie': 'll="118355"; bid=gSkudp2Zyr0; _pk_id.100001.4cf6=1b601be4917c9aa7.1742987847.; _pk_ses.100001.4cf6=1; ap_v=0,6.0; __utma=30149280.1186670132.1742987847.1742987847.1742987847.1; __utmc=30149280; __utmz=30149280.1742987847.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utmt_douban=1; __utmb=30149280.1.10.1742987847; __utma=223695111.1689357162.1742987847.1742987847.1742987847.1; __utmb=223695111.0.10.1742987847; __utmc=223695111; __utmz=223695111.1742987847.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __yadk_uid=P0L0FAcrlzkV17s4SmCVS2do54c0SNtx; _vwo_uuid_v2=D99B377FB72FD1894E44D4C31A5B4A5F5|5b5252ddddcd6239e70d07c89999b673'
    }
    req = request.Request(url=url, headers=headers)
    rsp = request.urlopen(req)
    html = rsp.read().decode()
    with open('msi.html', 'w', encoding="utf-8") as  f:
        print(html)
        f.write(html)